GET

授权

x-api-key
string
header
必填

请求头

bma-workspace-id
string

Project scope. Required when the API key can access more than one project. Also accepted as anthropic-workspace-id; headers sent together must agree, otherwise the request is a 400 workspace_id_conflict.

路径参数

desktop_session_id
string
必填

响应

Success.

type
string
必填

Always desktop_session.

Allowed value: "desktop_session"
id
string
必填

Desktop session ID (dsn_...).

Pattern: ^dsn_[a-z2-7]{26}$
org_id
string
必填
Pattern: ^org_[a-z2-7]{26}$
project_id
string
必填

Project ID (proj_...).

Pattern: ^proj_[a-z2-7]{26}$
machine_id
string
必填

Machine ID (mch_...).

Pattern: ^mch_[a-z2-7]{26}$
owner_id
string
必填

Opaque authenticated principal that created the session, such as a user UUID or organization API key ID.

read_only
boolean
必填
closed
boolean
必填
state
enum<string>
必填

A screen capture answers starting until the machine confirms it publishes (then live); tickets are issued and viewers connect meanwhile and receive the track once published. A start the machine does not confirm closes the session.

可用选项:
open,
starting,
live,
closing,
closed
created_at
string<date-time>
必填
capabilities
object
必填
control
object
必填
agent_id
string

The id /v1/agents uses (never the native agt_ id).

expires_at
string<date-time>

Screen capture keepalive deadline; ticket issuance does not extend it.

ticket
object

The first ticket, only in the answer of a create request that asked for one (ticket).

close_reason
enum<string>

Why the session ended, present once it is closed. capture_refused - the machine refused to publish its screen (opening again gets the same answer until something changes on the machine); capture_unconfirmed - the machine did not confirm the start in time; capture_lost - the machine stopped renewing a running capture; expired - the keepalive passed; closed_by_user - closed through POST /v1/desktop_sessions/{desktop_session_id}/close.

可用选项:
closed_by_user,
expired,
capture_refused,
capture_unconfirmed,
capture_lost